package com.atguigu.guli.service.edu;

import feign.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
/*
*
* 1.当前项目需要扫描本项目和依赖的service-base中的组件
* 指定扫描的基本包
*   ComponentScan:负责扫描spring的组件[controller,controllerAdvice,service,repository,component]
*   MapperScan: 负责扫描mybatis的mapper
*   ServletComponentScan: 负责扫描Tomcat的三大组件[WebServlet WebFilter WebListener]
* 2.mapper也需要指定扫描
*
* */
@EnableFeignClients//添加启动类注解
@EnableDiscoveryClient
@ComponentScan(basePackages = {"com.atguigu.guli"})

public class ServviceEduApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServviceEduApplication.class,args);

    }

    @Bean
    Logger.Level feignLoggerLevel(){
        return Logger.Level.FULL;
    }
}
